import ajax from "../common/fui-request.js"



export const AuthApi = {
	login: (data) => ajax.post('/wechat/mpLogin', {
		data
	}),
	// 获取用户绑定的手机号信息
	getUserPhone: (data, cb) => ajax.get('/wx/miniapp/user/phone', data, ),
	/**
	 * 发送验证码
	 */
	getCode: () => ajax.get('/code'),
	/**
	 * 获取用户openId
	 */
	getOpenId: (code) => ajax.get('/getWxUserInfo', {
		data: {
			code
		}
	}),
	/**
	 * 获取登录用户信息
	 */
	getLoginUserInfo: () => ajax.get('/system/user/profile/getInfo', {})
}